#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "user.h"
#include "room.h"

int cleanerMenu()
{
	int c;
	showTime(1);
	printf("\t\t\t        旅店管理系統\n");
	printf("\t\t\t=============================\n");
	printf("\t\t\t         保洁员系统\n");
	printf("\t\t\t   * 1 查询未打扫房间\n");
	printf("\t\t\t   * 2 确认房间打扫完成\n");
	printf("\t\t\t   * 3 修改个人信息\n");
	printf("\t\t\t   * 0 注销\n");
	printf("\t\t\t=============================\n");
	printf("\t\t\t请选择:");
	scanf("%d",&c);
	getchar();
	while(c < 0||c > 3)
	{
		printf("请重新输入:");
		scanf("%d",&c);
	}
	return c ;


}


void cleanerSystem(User *r)
{
	int c,loop = 1;
	Room *ro;
	while(loop)
	{
		system("clear");
		//printf("\n%s",r->name);
		//showTime(1);
		c = cleanerMenu();
		switch(c)
		{
			case 1:
				printf(RED);
				printf("show foom not clean \n");
				printf(NONE);
				ro = read_room();
				display_nclean_room(ro);
				printf("输入任意指令以继续:\n");
				getchar();
				break;
			case 2:
				printf(RED);
				printf("confirm room clean\n");
				printf(NONE);
				confirm_room_clean();
				printf("输入任意指令以继续: \n");
				getchar();
				break;
			case 3:
				printf(RED);
				printf("change my iformation\n");
				printf(NONE);
				change_my_userinf(r);
				break;
			case 0:
			default:
				loop = 0;
				break;
		}//switch(c)
	}
}
